<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:p="http://primefaces.org/ui"
	template="/templates/loggedTemplate.xhtml">
	
	<f:metadata>
		<f:event type="preRenderView"
			listener="#{papelBean.initConversation}" />
	</f:metadata>
	
	<ui:define name="content">
		<h1 class="formTitle ui-widget-header ui-corner-all">#{msg['papel.titulo.cadastro']}</h1>

		<h:form id="papelForm">
			
			<p:growl id="messages" />	
			
			<p:panelGrid columns="2" id="panel">
				#{msg['papel.nome']}
				<p:inputText value="#{papelBean.entidade.nome}" id="nome" label="#{msg['papel.nome']}" />
				
				#{msg['papel.descricao']}
				<p:inputText value="#{papelBean.entidade.descricao}" id="descricao" label="#{msg['papel.descricao']}" />
			</p:panelGrid>
			
			<div id="buttons" class="ui-widget ui-widget-header">
				<p:commandButton value="#{msg['botao.salvar']}" action="#{papelBean.salvar}" update="papelForm" ajax="false" />
				<p:commandButton value="#{msg['botao.cancelar']}" action="#{papelBean.cancelar}" immediate="true" />
			</div>
		</h:form>

	</ui:define>
</ui:composition>
